from django.conf.urls import url
from rest_framework_jwt.views import obtain_jwt_token

from meiduo_mall.apps.users import views

urlpatterns = [

    url(r'^test/$', views.TestView.as_view()),
    url(r'^test2/$',views.TestView2.as_view()),
    # 判断用户名是否重名
    url(r'^usernames/(?P<username>\w{5,20})/count/$', views.UsernameCountView.as_view()),
    # 注册用户
    url(r'^users/$',views.CreateUserView.as_view()),

    # 查询用户详情信息
    url(r'^user/$', views.UserDetailView.as_view()),
    # 修改用户：邮箱
    url(r'^email/$', views.EmailView.as_view()),

    # 激活用户邮箱
    url(r'^email/verification/$', views.VerifyEmailView.as_view()),

    # 登陆接口　obtain_jwt_token: 实现了登录视图接口的功能 不用再去写登陆视图
    url(r'^authorizations/$', obtain_jwt_token),


]










